//
//  VisionCollectionCell.m
//  BuffetNews
//
//  Created by weidawei on 14/11/7.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "VisionCollectionCell.h"

@implementation VisionCollectionCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        
        self.imageAisionOne = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionOne];
        
        self.imageAisionTow = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionTow];
        
        self.imageAisionThree = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionThree];
        
        self.imageAisionFour = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionFour];
        
        self.imageAisionFive = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionFive];
        
        self.imageAisionSix = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionSix];
        
        self.imageAisionSeven = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionSeven];
        
        self.imageAisionEight = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageAisionEight];
        
        
        [_imageAisionOne release];
        [_imageAisionTow release];
        [_imageAisionThree release];
        [_imageAisionFour release];
        [_imageAisionFive release];
        [_imageAisionSix release];
        [_imageAisionSeven release];
        [_imageAisionEight release];
        
 
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat height = self.contentView.frame.size.height;
    CGFloat width = self.contentView.frame.size.width;
    
    self.imageAisionOne.frame = CGRectMake(2, 0, width / 3 - 5, height/ 4 - 2 - 5);
    self.imageAisionTow.frame = CGRectMake(width / 3 , 0, width / 3 - 2, height / 4 - 5 - 2);
    self.imageAisionThree.frame = CGRectMake(width / 3 * 2 , 0, width / 3 - 2, height / 4 - 5 - 2);
    self.imageAisionFour.frame = CGRectMake(2, height / 4 - 5, width / 3 - 5, height / 4 - 2 - 5);
    self.imageAisionFive.frame = CGRectMake(width / 3 - 1 , height / 4 - 5, width / 3 * 2 - 1, height / 4 - 2- 5);
    self.imageAisionSix.frame = CGRectMake(2, height / 4 * 2 - 10, width / 3 - 5, height / 4 - 2- 5);
    self.imageAisionSeven.frame = CGRectMake(2, height / 4 * 3 - 15, width / 3 - 5, height / 4 - 2- 5);
    self.imageAisionEight.frame = CGRectMake(width / 3  , height / 4 * 2 - 10, width / 3 * 2 - 2, height / 4 * 2 - 2- 10);

    
}

- (void)dealloc
{
    [_imageAisionOne release];
    [_imageAisionTow release];
    [_imageAisionThree release];
    [_imageAisionFour release];
    [_imageAisionFive release];
    [_imageAisionSix release];
    [_imageAisionSeven release];
    [_imageAisionEight release];
    [super dealloc];
}
@end
